package br.uvv.Web.ManagedBean;
import java.io.Serializable;

import org.primefaces.model.LazyDataModel;

import br.uvv.Model.Artefato;
import br.uvv.Service.ArtefatoService;
import br.uvv.Util.InitUtil;

public class ArtefatoBean implements Serializable {

	private static final long serialVersionUID = 1195465736107136284L;

	private ArtefatoService controller;
	
	private Artefato artefatoInstance;
	private Artefato artefatoInstanceTemp;
	private LazyDataModel<Artefato> artefatoList;
	
	private String varBuscaNome;
	
	public String artefato(){
		init();
		return "/views/artefato/show.xhtml";
	}
	
	private void init(){
		controller = new ArtefatoService();
		artefatoInstance = new Artefato();
		artefatoInstanceTemp = new Artefato();
		artefatoList = InitUtil.inicializaArtefatoList();
		varBuscaNome = "";
	}
	
	public void goCreate(){
		
	}
	
	public void goEdit(){
		
	}
	
	public String goHome(){
		controller = null;
		artefatoInstance = null;
		artefatoInstanceTemp = null;
		artefatoList = null;
		varBuscaNome = null;
		return "goHome";
	}

	public ArtefatoService getController() {
		return controller;
	}

	public void setController(ArtefatoService controller) {
		this.controller = controller;
	}

	public Artefato getArtefatoInstance() {
		return artefatoInstance;
	}

	public void setArtefatoInstance(Artefato artefatoInstance) {
		this.artefatoInstance = artefatoInstance;
	}

	public Artefato getArtefatoInstanceTemp() {
		return artefatoInstanceTemp;
	}

	public void setArtefatoInstanceTemp(Artefato artefatoInstanceTemp) {
		this.artefatoInstanceTemp = artefatoInstanceTemp;
	}

	public LazyDataModel<Artefato> getArtefatoList() {
		return artefatoList;
	}

	public void setArtefatoList(LazyDataModel<Artefato> artefatoList) {
		this.artefatoList = artefatoList;
	}

	public String getVarBuscaNome() {
		return varBuscaNome;
	}

	public void setVarBuscaNome(String varBuscaNome) {
		this.varBuscaNome = varBuscaNome;
	}
}